package com.myspring.lab.control;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class hello {
    @PostMapping("/hello")
    public String hello(Model mv){
        mv.addAttribute("msg","hello");
        return "go";
    }

    @RequestMapping("/go")
    public String go(){
        return "go";
    }

}
